Page({
  data: {
    notices: []
  },
  onLoad() {
    this.getAnnouncement()
    // wx.$toast('提示信息', 'success')
  },
  onShow() {
    const pages = getCurrentPages()
    console.log(pages)
  },
  async getAnnouncement() {
    const data = await wx.$http.get('/announcement')
    console.log(data)
    // 拿到具体的数据: res.data.data
    this.setData({ notices: data })
  }
})
